package com.dragon.utilslibrary.network.http;

import java.util.HashMap;

/**
 * 响应封装
 * 转主线程
 * @author king.liangjinshui
 *
 */
public class HttpRespose{
	private String json;
	private String path;
	private int erroCode = -1000;
	private Exception e;
	private String msg;
	/*HTTP/1.1 200 OK
	Server:JSP2/1.0.16
	Date:Mon, 04 Nov 2013 03:06:26 GMT
	Content-Type:audio/mpeg
	Connection:close
	Content-Length:2518244
	Accept-Ranges:bytes
	Last-Modified:Wed, 23 Oct 2013 02:56:23 GMT
	Expires:Fri, 22 Nov 2013 12:20:18 GMT
	x-bs-version:9AB3778C345E22493B1B8D3D1E7D92C1
	ETag:f05c8c3e7e7328b5ec3913051c256170
	x-bs-request-id:MTAuNDYuMjI4LjQ0OjgwODA6Mjk3MDIxMTc1NToyMy9PY3QvMjAxMyAyMDoyMDoxOCA=
	Content-Disposition:attachment; filename="²»ÖµµÃ.mp3"
	x-bs-meta-crc32:657750654
	Content-MD5:f05c8c3e7e7328b5ec3913051c256170
	x-bs-client-ip:NTguMjE1LjEyMy45Mg==
	x-bs-uncopyable:enable
	Cache-Control:max-age=2592000*/

	private HashMap<String, String> resposeMap;
	/**
	 * 获取响应头
	 * @return
	 */
	public HashMap<String, String> getResposeMap() {
		return resposeMap;
	}
	public void setResposeMap(HashMap<String, String> resposeMap) {
		this.resposeMap = resposeMap;
	}
	/**
	 * 服务器返回json字符串
	 * 此字段有值代表http成功，
	 * 否则：http失败，失败code请看 getE() 或 getErroCode()
	 * 
	 * @return
	 */
	public String getJson() {
		return json;
	}
	public void setJson(String json) {
		this.json = json;
	}
	/**
	 * 异常
	 * @return
	 */
	public Exception getE() {
		return e;
	}
	public void setE(Exception e) {
		this.e = e;
	}
	/**
	 * 下载的路径
	 * @return
	 */
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
	/**
	 * 错误code
	 * 此code为 标准http 错误 code
	 * @return
	 */
	public int getErroCode() {
		return erroCode;
	}
	public void setErroCode(int erroCode) {
		this.erroCode = erroCode;
	}
	/**
	 * 错误提示
	 * @return
	 */
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	
}
